*** Settings ***
Resource          ../../CommonVars/Locations/SITSYS/MoudleView/LMotorView/LMotorView.robot
Library           ../../CommonLibs/FDataFactors/DFactors.py
Resource          ../OpSelectSelect.robot

*** Keywords ***
Op Motor
    [Arguments]    ${car}    ${是否两地车}
    #填写车牌号 车架号 \ 发动机号
    Clear Element Text    ${LMotorlicenseNo}
    Clear Element Text    ${LMotoVinNo}
    Clear Element Text    ${LMotorEngineNo}
    ${CustomerLicense}=    run keyword if    '${是否两地车}'=='两地车'    CustomLicense    M    A
    ...    ELSE    CustomLicense    粤    A
    input text    ${LMotorlicenseNo}    ${CustomerLicense}
    ${VIN}=    MotorVin
    input text    ${LMotoVinNo}    ${VIN}
    ${Engine}=    MotorEngineNo
    input text    ${LMotorEngineNo}    ${Engine}
    Go SelectSelect    ${LMotorModelCName}    NONE    ${car}
    sleep    3
    #厂牌型号 等待
    ${count} =    Get Element Count    ${LMotorModelCNameSelectFirst}
    Run Keyword if    ${count} == 1    Click Element    ${LMotorModelCNameSelectFirst}
    ...    ELSE    log    ${LMotorModelCNameSelectFirst} \ not drop down
    # 初登日期
    ${enrolltime}=    MotorEnrollDate    0
    input text    ${LMotorEnrollDate}    ${enrolltime}
